const initialState = {
  localStream: null,
  remoteStreams: null,
};

const detailReducer = (state = initialState, action) => {
  switch (action.type) {
    case 'CLEAR_STREAM': {
      return {
        ...state,
        localStream: null,
        remoteStreams: []
      }
    }
    case 'STREAM_SUCCESS': {
      return {
        ...state,
        localStream: action.data
      }
    }
    default: return state;
  }
};
export default detailReducer;